home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 7 / Amoszine 7 (Disk 3 of 3).adf / ARCHIVES / Paul_Overy.lha / Iff_Info.amos / Iff_Info.amosSourceCode
AMOS Source Code  |  1995-06-03  |  2KB  |  65 lines

  1. 'By Paul Overy 
  2. '
  3. 'This method works, no fixed locations are read!!! 
  4. '
  5. '
  6. Screen Open 0,640,256,2,Hires : Cls 0 : Palette 0,$CCC
  7. _IFF$=Fsel$("","","Find a Iff picture")
  8. Open In 1,_IFF$ : _LOF=Lof(1) : Close 1
  9. Reserve As Work 15,_LOF : Bload _IFF$,15
  10. '
  11. _FORM=Hunt(Start(15) To Extension_12_0AD8(15),"FORM")
  12. Print Chr$(Peek(_FORM));
  13. Print Chr$(Peek(_FORM+1));
  14. Print Chr$(Peek(_FORM+2));
  15. Print Chr$(Peek(_FORM+3));
  16. Print Leek(_FORM+4);" [Chunk]"
  17. '
  18. _ILBM=Hunt(Start(15) To Extension_12_0AD8(15),"ILBM")
  19. Print Chr$(Peek(_ILBM));
  20. Print Chr$(Peek(_ILBM+1));
  21. Print Chr$(Peek(_ILBM+2));
  22. Print Chr$(Peek(_ILBM+3))
  23. '
  24. _BMHD=Hunt(Start(15) To Extension_12_0AD8(15),"BMHD")
  25. Print Chr$(Peek(_BMHD));
  26. Print Chr$(Peek(_BMHD+1));
  27. Print Chr$(Peek(_BMHD+2));
  28. Print Chr$(Peek(_BMHD+3));
  29. Print Leek(_BMHD+4);" [Chunk]"
  30. Print Deek(_BMHD+8);" [Width]"
  31. Print Deek(_BMHD+10);" [Hight]"
  32. Print Deek(_BMHD+12);" [X pos]"
  33. Print Deek(_BMHD+14);" [Y pos]"
  34. Print Peek(_BMHD+16);" [No#planes /";Peek(_BMHD+16)^2;" colours]"
  35. Print Peek(_BMHD+17);" [Masking]"
  36. Print Peek(_BMHD+18);" [Compression]"
  37. Print Peek(_BMHD+19);" [Future/Pad]"
  38. Print Deek(_BMHD+20);" [Transparent Col]"
  39. Print Peek(_BMHD+22);" [Ratio Width]"
  40. Print Peek(_BMHD+23);" [Ratio Height]"
  41. Print Deek(_BMHD+24);" [Page Width]"
  42. Print Deek(_BMHD+26);" [Page Height]"
  43. '
  44. _CMAP=Hunt(Start(15) To Extension_12_0AD8(15),"CMAP")
  45. _CMAP_CHUNK=Leek(_CMAP+4)
  46. _COL_MAP=_CMAP+8
  47. _COL_MAP_LAST=_COL_MAP+_CMAP_CHUNK
  48. Print Chr$(Peek(_CMAP));
  49. Print Chr$(Peek(_CMAP+1));
  50. Print Chr$(Peek(_CMAP+2));
  51. Print Chr$(Peek(_CMAP+3));
  52. Print _CMAP_CHUNK;" [Colour map chunk]"
  53. For _INDEX=_COL_MAP To _COL_MAP_LAST
  54.    Print Peek(_INDEX);
  55. Next _INDEX
  56. _BODY=Hunt(Start(15) To Extension_12_0AD8(15),"BODY")
  57. _BODY_CHUNK=Leek(_BODY+4)
  58. _BODY_BYTES=_BODY+8
  59. _BODY_BYTES_LAST=_BODY_BYTES+_BODY_CHUNK
  60. Print 
  61. Print Chr$(Peek(_BODY));
  62. Print Chr$(Peek(_BODY+1));
  63. Print Chr$(Peek(_BODY+2));
  64. Print Chr$(Peek(_BODY+3));
  65. Print _BODY_CHUNK;" [Chunk]"